package com.itheima.day09;
/*
案例1:
 */

public class TestClassCase01 {

    public static void main(String[] args) {

        Student[] st=new Student[3];

        Student t1=new Student("张沙",21);
        Student t2=new Student("张升",20);
        Student t3=new Student("凯沙",23);


        st[0]=t1;
        st[1]=t2;
        st[2]=t3;

        for (int i = 0; i < st.length; i++) {
            Student s=st[i];
            System.out.println("姓名:"+s.getName()+",年龄"+s.getAge());
        }
    }
}
